package com.cysnake.quitsmoke.activity;

import com.cysnake.quitsmoke.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity {
	/** Called when the activity is first created. */
	Button plan;
	Button history;
	Button cost;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		modify();
	}

	private void modifyButton() {
		plan = (Button) findViewById(R.id.main_Plan_Button);
		OnClickListener planButtonLsn = new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(MainActivity.this, PlanActivity.class);
				startActivity(intent);
			}
		};
		plan.setOnClickListener(planButtonLsn);
		history = (Button) findViewById(R.id.main_History_Button);
		
		cost = (Button) findViewById(R.id.main_Cost_Button);
		OnClickListener costButtonLsn = new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(MainActivity.this, CostActivity.class);
				startActivity(intent);
			}
		};
		cost.setOnClickListener(costButtonLsn);
	}

	private void modify() {
		modifyButton();
	}
}